package com.asion.vmovie.ui.MVPPresenter;

import com.asion.vmovie.beans.SeriesDetialsBean;
import com.asion.vmovie.beans.VideoBean;
import com.asion.vmovie.ui.MVPContract.XiLieDetialContract;

/**
 * Created by asion on 16-10-21.
 */

public class SeriesPresent extends XiLieDetialContract.Presenter {
    @Override
    public void getSeriesDetial(int seriesid) {
        mModel.getSeriesDetial(seriesid, new XiLieDetialContract.OnGetSeriesData() {
            @Override
            public void onGetSuccess(SeriesDetialsBean seriesDetialsBean) {
                mView.showDataSuccess(seriesDetialsBean);
            }

            @Override
            public void onGetError(Throwable throwable) {
                mView.showDataError(throwable);
            }
        });
    }

    @Override
    public void getVideoDetial(int series_postid) {
        mModel.getVideo(series_postid, new XiLieDetialContract.OnGetVideoData() {
            @Override
            public void onGetSuccess(VideoBean videoBean) {
                mView.showDataSuccess(videoBean);
            }

            @Override
            public void onGetError(Throwable throwable) {
                mView.showDataError(throwable);
            }
        });
    }
}
